package net.carinae.dev.seduku.web.pages;

import net.carinae.dev.seduku.dao.Sudoku4Dao;
import net.carinae.dev.seduku.utils.SudokuGenerator;
import net.carinae.dev.seduku.web.panels.LanguageSwitcher;
import net.carinae.dev.seduku.web.panels.Sudoku4Panel;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.spring.injection.annot.SpringBean;

public class Play extends WebPage {
	
	@SpringBean
	protected Sudoku4Dao sudoku4Dao;
	
	public Play() {
		// Uncomment if you want to init your sudokus db
		SudokuGenerator s4Gen = new SudokuGenerator();
		sudoku4Dao.persist(s4Gen.generateSudoku());
		
		add(new Sudoku4Panel("sudokuPanel"));
		add(new LanguageSwitcher("languageSwitcher"));
	}

}
